<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>分支语句-if</title>
</head>
<script>
    function foo(day) {
        var day;
        if (day == 1) {
            console.log('今天是周一')
        }
        else if (day == 2){
            console.log('今天是周二')
        }
        else if (day == 3){
            console.log('今天是周三')
        }
        else if (day == 4){
            console.log('今天是周四')
        }
        else if (day == 5){
            console.log('哇！今天周五')
        }
        else if (day == 6){
            console.log('周六终于可以睡懒觉了')
        }
        else if (day == 7){
            console.log('周末再放松一天')
        }
    }
    foo(5)
</script>
<body>

</body>
</html>